﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WooCoo.DataPortal.Client
{    
    /// <summary>
    /// Odata错误信息Json格式容器封装
    /// </summary>
    public sealed class ODataErrorFormat
    {
        [JsonProperty("odata.error")]
        public ODataError ODataError { get; set; }
        public ODataErrorFormat()
        {
        }
    }
    /// <summary>
    /// 错误信息类
    /// </summary>
    public sealed class ODataError
    {
        [JsonProperty("code")]
        public string Code { get; set; }
        [JsonProperty("message")]
        public MessageInfo MessageInfo { get; set; }
        [JsonProperty("innererror")]
        public ODataInnerError InnerError { get; set; }

    }

    public sealed class MessageInfo
    {
        public string Lang { get; set; }
        public string Value { get; set; }
    }

    public sealed class ODataInnerError
    {
        public string Message { get; set; }
        public string Type { get; set; }
        public string StackTrace { get; set; }

        public ODataInnerError InternalException { get; set; }
        public ODataInnerError()
        {

        }
    }
}
